/**
 * Created by huxia on 2016/12/9.
 */
var Outcall = require('./db')['Outcall'];

Outcall.findById = function(oc_id) {
    return Outcall.findOne({
        where: {
            id: oc_id
        }
    });
};

Outcall.findByDoc = function(docid) {
    return Outcall.findAll({
        where: {
            doc_id: docid
        }
    });
};

// Outcall.findByDoc(1).then(function (outcall) {
//     console.log(outcall[0]);
// });

module.exports = Outcall;
